package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 折扣记录对象 sys_discount
 * 
 * @author ruoyi
 * @date 2024-11-21
 */
public class SysDiscount extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 折扣ID */
    private Long discountId;

    /** 会员ID */
    @Excel(name = "会员ID")
    private Long memberId;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 折扣率（如0.9表示9折） */
    @Excel(name = "折扣率", readConverterExp = "如=0.9表示9折")
    private BigDecimal discountRate;

    /** 原价金额 */
    @Excel(name = "原价金额")
    private BigDecimal originalAmount;

    /** 折扣后金额 */
    @Excel(name = "折扣后金额")
    private BigDecimal discountedAmount;

    /** 折扣时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "折扣时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date discountTime;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdTime;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedTime;

    public void setDiscountId(Long discountId) 
    {
        this.discountId = discountId;
    }

    public Long getDiscountId() 
    {
        return discountId;
    }
    public void setMemberId(Long memberId) 
    {
        this.memberId = memberId;
    }

    public Long getMemberId() 
    {
        return memberId;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setDiscountRate(BigDecimal discountRate) 
    {
        this.discountRate = discountRate;
    }

    public BigDecimal getDiscountRate() 
    {
        return discountRate;
    }
    public void setOriginalAmount(BigDecimal originalAmount) 
    {
        this.originalAmount = originalAmount;
    }

    public BigDecimal getOriginalAmount() 
    {
        return originalAmount;
    }
    public void setDiscountedAmount(BigDecimal discountedAmount) 
    {
        this.discountedAmount = discountedAmount;
    }

    public BigDecimal getDiscountedAmount() 
    {
        return discountedAmount;
    }
    public void setDiscountTime(Date discountTime) 
    {
        this.discountTime = discountTime;
    }

    public Date getDiscountTime() 
    {
        return discountTime;
    }
    public void setCreatedTime(Date createdTime) 
    {
        this.createdTime = createdTime;
    }

    public Date getCreatedTime() 
    {
        return createdTime;
    }
    public void setUpdatedTime(Date updatedTime) 
    {
        this.updatedTime = updatedTime;
    }

    public Date getUpdatedTime() 
    {
        return updatedTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("discountId", getDiscountId())
            .append("memberId", getMemberId())
            .append("userId", getUserId())
            .append("discountRate", getDiscountRate())
            .append("originalAmount", getOriginalAmount())
            .append("discountedAmount", getDiscountedAmount())
            .append("discountTime", getDiscountTime())
            .append("createBy", getCreateBy())
            .append("createdTime", getCreatedTime())
            .append("updateBy", getUpdateBy())
            .append("updatedTime", getUpdatedTime())
            .toString();
    }
}
